<template>
  <div>
    <h2>HomeIndex</h2>


    state: {{ $store.state.cart.title }} - {{ $store.state.shop.title }} - {{
      $store.state.shop.shopA.title
    }}
    <hr>
    getters: {{ $store.getters['cart/g1'] }} - {{ $store.getters['shop/g1'] }} - {{
      $store.getters['shop/shopA/g1'] }}

    <hr>
    <button @click="$store.commit('cart/SET_TITLE', 'net Cart')">cart SET_TITLE</button>
    <button @click="$store.commit('shop/SET_TITLE', 'net Shop')">shop SET_TITLE</button>
    <button @click="$store.commit('shop/shopA/SET_TITLE', 'net ShopA')">shopA SET_TITLE</button>

    <hr>
    <button @click="$store.dispatch('cart/add', { x: 1, y: 2 })">cart add</button>
    <button @click="$store.dispatch('shop/add', { x: 3, y: 4 })">shop add</button>
    <button @click="$store.dispatch('shop/shopA/add', { x: 5, y: 6 })">shopA add</button>

    <hr>

    {{ $store.state.count }}
    <button @click="$store.dispatch('add', { x: 100, y: 200 })">action add</button>

    <hr>


  </div>
</template>

<script>
export default {

};
</script>